package com.entor.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.entor.service.ReportService;
import com.entor.util.HighChartUtil;

@RequestMapping("/pc")
@Controller
public class ReportController {
	
	@Autowired
	private ReportService ps;
	
	@RequestMapping("/index")
	public String index(){
		return "/report/index";
	}
	@RequestMapping("/pie")
	public String pie(){
		return "/report/pie";
	}
	@RequestMapping("/column")
	public String column(){
		return "/report/column";
	}
	@RequestMapping("/line")
	public String line(){
		return "/report/line";
	}
	
	@RequestMapping("/getPieStr")
	@ResponseBody
	public String getPieStr(){
		return ps.getPieData();
	}
	
	@RequestMapping("/getCoulmn/{type}")
	@ResponseBody
	public String getColumn(@PathVariable(value="type") String type){
		return ps.getColumn(type);
	}

}
